{config_load file="/libs/lang_team_cs.conf"}    



<div style="float:left;margin-bottom:-35px"><h2 style="margin-top:0px;border:none">{#Your_Site_Name#} <span style="color:darkblue">{#Teams#}</span></h2><br /></div>
<div style="float:right;margin-bottom:-35px"><a href="javascript://" style="font-size:12pt;text-decoration:none;font-weight:bold" 
onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'" onclick="alert('Prozatím není k dispozici, dotazy směřujte na fórum')">{#Help_Section#}</a></div>
<br clear="all">
<hr style="background:black" />

{*For errors*}
{if $unauthorized_access eq true}
<div class="error" style="color:black;width:99.35%"><img src="{$my_pligg_base}/templates/{$the_template}/images/error_stop.png" style="height:32px;width:32px;"/>
<div style="font-size:12pt;margin-top:-28px;margin-left:40px;margin-bottom:3px">{#Unauthorized_Access#}</div></div>
{/if}



{if $team_error_present eq true}

<div class="error" style="color:black;width:99.35%"><img src="{$my_pligg_base}/templates/{$the_template}/images/error_stop.png" style="height:32px;width:32px;"/>
<div style="font-size:12pt;margin-top:-28px;margin-left:40px;margin-bottom:3px">{#Error_Report#}</div></div>
{section name=error loop=$team_error}

   {if $team_error[error] eq 1}<div class="error_t" >{#No_Team_Name#}</div>{/if}
   {if $team_error[error] eq 2}<div class="error_t" >{#Short_Team_Name#}</div>{/if}
   {if $team_error[error] eq 3}<div class="error_t" >{#No_Team_Publicity#}</div>{/if}
   {if $team_error[error] eq 4}<div class="error_t" >{#No_Team_Category#}</div>{/if}
   {if $team_error[error] eq 5}<div class="error_t" >{#No_Team_Objective#}</div>{/if}
   {if $team_error[error] eq 6}<div class="error_t" >{#Short_Team_Objective#}</div>{/if}
   {if $team_error[error] eq 7}<div class="error_t" >{#No_Team_Rating#}</div>{/if}
   {if $team_error[error] eq 8}<div class="error_t" >{#Cannot_Save_New_Team_Database#}</div>{/if}  
   {if $team_error[error] eq 9}<div class="error_t" >{#Team_Name_Already_Exist#}</div>{/if}  
   
              
{/section}

{/if}
 {*/For errors*}

 {*For confirmations*}
{if $team_confirmation_present eq true}


{section name=confirm loop=$team_confirmation}

{if $team_confirmation[confirm] eq 1}
<div id="team_created" class="confirmation" style="color:black;width:99.35%"><img src="{$my_pligg_base}/templates/{$the_template}/images/confirmed.png" style="height:32px;width:32px;"/>
<div style="font-size:12pt;margin-top:-28px;margin-left:40px;margin-bottom:3px">{#Team_Successfully_Created#}</div></div>
<script type="text/javascript">hide('team_created');</script> 
{/if}

{if $team_confirmation[confirm] eq 2}
<div id="team_deleted" class="confirmation" style="color:black;width:99.35%"><img src="{$my_pligg_base}/templates/{$the_template}/images/confirmed.png" style="height:32px;width:32px;"/>
<div style="font-size:12pt;margin-top:-28px;margin-left:40px;margin-bottom:3px">{#Team_Successfully_Deleted#}</div></div>
<script type="text/javascript">hide('team_deleted');setTimeout ( "self.location.href='/team.php'", 1500 ); </script>  
{/if}
  
{/section}

{/if}
 {*/For confirmations*}
   <br />           
  
<div style="border:1px dashed #C9C9C9;text-align:center;font-size:8pt;"  onclick="showHide('team_create_settings','fade');makeMeStronger(this);"


onmouseover="this.style.background='#f4f4ff';this.style.cursor='pointer'" 
onmouseout="this.style.background='none';this.style.cursor='auto'">{#Create_New_Team#}</div><br />

{*Team sorting and filtering start*}
  <form action="" method="get">   
<div style="float:left">
{#Order_By#}:
<select name="sortby" style="width:278px" >

               <option value="1" {if $team_sorting eq 1}selected="selected"{/if}  >
               &nbsp;&nbsp;&nbsp;
               {#Sort_Name_Asc#}
               </option>
               <option value="2" {if $team_sorting eq 2}selected="selected"{/if}  >
               &nbsp;&nbsp;&nbsp;
               {#Sort_Name_Desc#}
               </option>
               <option value="3" {if $team_sorting eq 3}selected="selected"{/if} >
               &nbsp;&nbsp;&nbsp;
               {#Sort_Date_Asc#}
               </option>
               <option value="4" {if $team_sorting eq 4 or $team_sorting eq false}selected="selected"{/if} >
               &nbsp;&nbsp;&nbsp;
               {#Sort_Date_Desc#}
               </option>

</select>
</div>
<div style="float:left;margin-left:15px">
{#Filter_By#}:
        <select name="filterby" style="width:278px{if $team_filtering neq false};background:#ffffdf{/if}" >
        <option value="999" {if $team_filtering eq false}selected="selected"{/if}>&nbsp;&nbsp;&nbsp;{#No_Filter#}</option>
            {section name=thecat loop=$cat_array start=0}
                <option value = "{$cat_array[thecat].auto_id}" {if $team_filtering eq $cat_array[thecat].auto_id}selected="selected"{/if}>
                {if $cat_array[thecat].spacercount lt $lastspacer}{$cat_array[thecat].spacerdiff|repeat_count:''}{/if}
                {if $cat_array[thecat].spacercount gt $lastspacer}{/if}
                {$cat_array[thecat].spacercount|repeat_count:'&nbsp;&nbsp;&nbsp;'}
                {$cat_array[thecat].name}
                &nbsp;&nbsp;&nbsp;
                {assign var=lastspacer value=$cat_array[thecat].spacercount}
                </option>
            {/section}
        </select>                
        </div>
        <div style="float:left;margin-left:10px">
        <input type="submit" value="{#Perform#}" accesskey="1" class="buttMain" >
        <input type="hidden" value="1" name="sort_filter_request">
        </div>

 </form>
 {*/ Team sorting and filtering *}  
 
  <br clear="all">{if $user_browser eq "msie"}<br />{/if}     
  
<fieldset style=" line-height: 29px;{if $automatic_team_creation_form neq true}display:none{/if}" id="team_create_settings" >
<legend class="team_legend" {if $user_browser eq "msie"}style="margin-top:-12px"{/if}>{#Creating_New_Team#}</legend> <br />

 <form action="" method="post" id="team_create_edit_form">   
  
<table border=0 style="margin-bottom:10px;line-height:4ex;width:860px">
  <tr>                 
  <td style="width:260px;text-align:left"> <span style="text-decoration:underline">{#Team_Name#}:</span><span class="popisek"> ({#Max_30_Chars#})</span> </td> 
  <td style="text-align:left;color:darkblue;font-weight:bold;width:275px">
  <input id="team_name" name="name" type="text" maxlength="30" style="width:275px;"
   onkeyup="isOKTip(EL('team_name'),{$minimal_team_name_length},1,1,'{#Error_Input#}','{#Chars_Needed#}','{#Input_Ok#}','{#Minimal_Maximal_Length_Ok#}')"
   {if $highlight_team_name eq 1}class="highlight_error"{/if} value="{$team_name}"/>  </td>
  <td style="width:10px"></td> 
  <td style="width:190px;text-decoration:underline;text-align:left">{#Team_Publicity#}:</td>
  <td style="text-align:left;color:darkblue;font-weight:bold;width:165px">
    <select name="publicity" style="width:120px" {if $highlight_team_publicity eq 1}class="highlight_error"{/if}>                                  
               <option value="999" {if $team_publicity_select neq true}selected="selected"{/if}
               >&nbsp;&nbsp;&nbsp;
               {#Select#}
               </option>  
               <option value = "1" {if $team_publicity eq 1}selected="selected"{/if}>
               &nbsp;&nbsp;&nbsp;
                {#Team_Public#}
              </option> 
              <option value = "0" {if $team_publicity eq 0} {if $team_publicity_select eq 1}selectedselected="selected"{/if}{/if}>
               &nbsp;&nbsp;&nbsp;
                {#Team_Private#}
              </option>
                                                  
    </select>&nbsp;<img src="{$my_pligg_base}/templates/{$the_template}/images/help2.png" style="margin-bottom:-5px;width:22px;height:22px" 
    onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='auto'"
    onclick="Tip('<div style=&quot;float:left;margin-top:8px&quot;><img src=&quot;{$my_pligg_base}/templates/{$the_template}/images/support_help.png&quot; style=&quot;width:48px;height:48px&quot;></div><div style=&quot;width:300px;float:left;text-align:left;border:1px solid darkblue;margin-top:3px;margin-bottom:3px;padding:8px 8px 8px 8px;background:#F0F8FF;margin-left:3px;margin-right:3px;&quot; id=&quot;completeness&quot;>{#Team_Publicity_Text#}</div>',
      TITLE,'{#Team_Publicity_Help#}',TITLEBGCOLOR,
           '#000099',STICKY,true,BORDERCOLOR,'#003C95',FONTCOLOR,'#000099',BGCOLOR,'#97CBFF',
             DELAY,0,DURATION,11000,BGCOLOR,'#F2FDFF',FADEOUT,300,CENTERMOUSE, true,OPACITY,90,CLICKCLOSE,true)"/>
    </td>

  

  </tr>
  <tr>
    <td style="width:260px;text-align:left"><span style="text-decoration:underline">{#Team_Category#}:</span></td>
    <td style="line-height:2ex;width:278px">
        <select name="category" style="width:278px" {if $highlight_team_category eq 1}class="highlight_error"{/if}>
        <option value="999" {if $team_category eq false}selected="selected"{/if}>&nbsp;&nbsp;&nbsp;{#Choose_Category#}</option>
            {section name=thecat loop=$cat_array start=0}
                <option value = "{$cat_array[thecat].auto_id}" {if $team_category eq $cat_array[thecat].auto_id}selected="selected"{/if}>
                {if $cat_array[thecat].spacercount lt $lastspacer}{$cat_array[thecat].spacerdiff|repeat_count:''}{/if}
                {if $cat_array[thecat].spacercount gt $lastspacer}{/if}
                {$cat_array[thecat].spacercount|repeat_count:'&nbsp;&nbsp;&nbsp;'}
                {$cat_array[thecat].name} 
                &nbsp;&nbsp;&nbsp;       
                {assign var=lastspacer value=$cat_array[thecat].spacercount}                    
                </option>
            {/section}
        </select>
   
    </td>
    <td style="width:10px"></td>  
    <td style="width:250px;text-decoration:underline;text-align:left">{#Team_Minimal_Rating#}:</td>
    <td style="text-align:left;color:darkblue;width:165px">
    
     <select name="rating" style="width:120px" {if $highlight_team_rating eq 1}class="highlight_error"{/if}>
            
            <option value="999" {if $team_rating_selected neq true}selected="selected"{/if}>
            &nbsp;&nbsp;&nbsp;
            {#Select#}
            </option>  
           {section name=rating loop=$rating_array start=0}
            <option value = "{$rating_array[rating]}" {if $team_rating eq $rating_array[rating]}{if $team_rating_selected eq 1}selected="selected"{/if}{/if}>
               &nbsp;&nbsp;&nbsp;
                {$rating_array[rating]}/10 
              </option>      
           {/section}                            
        </select>&nbsp;<img src="{$my_pligg_base}/templates/{$the_template}/images/help2.png" style="margin-bottom:-5px;width:22px;height:22px"
        onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='auto'"
            onclick="Tip('<div style=&quot;float:left;margin-top:8px&quot;><img src=&quot;{$my_pligg_base}/templates/{$the_template}/images/support_help.png&quot; style=&quot;width:48px;height:48px&quot;></div><div style=&quot;width:300px;float:left;text-align:left;border:1px solid darkblue;margin-top:3px;margin-bottom:3px;padding:8px 8px 8px 8px;background:#F0F8FF;margin-left:3px;margin-right:3px;&quot; id=&quot;completeness&quot;>{#Team_Minimal_Rating_Explanation#}</div>',
      TITLE,'{#Team_Minimal_Rating_Help#}',TITLEBGCOLOR,
           '#000099',STICKY,true,BORDERCOLOR,'#003C95',FONTCOLOR,'#000099',BGCOLOR,'#97CBFF',
             DELAY,0,DURATION,11000,BGCOLOR,'#F2FDFF',FADEOUT,300,CENTERMOUSE, true,OPACITY,90,CLICKCLOSE,true)"/>
    </td>
   
   
  </tr>  
  <tr>
   <td style="width:260px;text-align:left"><span style="text-decoration:underline">{#Team_Objective#}:</span><span class="popisek"> ({#Max_60_Chars#})</span></td>
    <td><input id="team_objective" name="objective" type="text" maxlength="60" style="width:275px" value="{$team_objective}" 
      onkeyup="isOKTip(EL('team_objective'),{$minimal_team_objective_length},1,1,'{#Error_Input#}','{#Chars_Needed#}','{#Input_Ok#}','{#Minimal_Maximal_Length_Ok#}')"
    {if $highlight_team_objective eq 1}class="highlight_error"{/if}/></td>
  </tr>                                                                                                 
</table> 
  <input type="submit" id="create_team" class="buttMain" value="{#Create_Team#}" style="margin-left:5px"> 
  <input type="hidden" name="team_request" value="1" />
</form>               
</fieldset>
 
{if $team_exist eq true}
<table border="0" style="border:1px black solid;border-collapse:collapse;line-height:3ex">
<tr>
<th  class="zahlavi_tab" nowrap>{#Team_Name#}</th>
<th  class="zahlavi_tab" nowrap style="width:130px">{#Team_Administrator#}</th>
<th  class="zahlavi_tab" nowrap>{#Team_Category#}</th> 
<th  class="zahlavi_tab" nowrap>{#Team_Objective#}</th>
<th  class="zahlavi_tab" nowrap style="width:150px">{#Team_Publicity#}</th>
<th  class="zahlavi_tab" nowrap>{#Team_Created#}</th>


</tr>
{section name=team loop=$team_ids}
<tr nowrap style="line-height:3ex">
<td nowrap><a href="{$URL_theteam}{$team_ids[team]}" style="text-decoration:none;font-weight:bold;color:darkblue" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{$team_names[team]}</a></td>
<td nowrap >
    <span class="tooltipblue" title="<div class='titlecontent'>{#Send_Message_Team_Creator#} <b>{$team_names[team]}</b></div>">
    <a href="{$creator_message_urls[team]}"><img src="{$my_pligg_base}/templates/{$the_template}/images/teampost.png" style="height:16px;width:16px;margin-bottom:-3px" alt="message"></a>
    </span>
    
    <a class="teamlink" href="{$creator_urls[team]}">{$creator_names[team]}</a>     
    

   

</td>
<td nowrap >{$team_category_names[team]}</td>
<td nowrap >{$team_objectives[team]}</td>
<td nowrap style="font-weight:bold">{if $team_publicitys[team] eq true}<span style="color:green">{#Public#}</span>{else}<span style="color:darkred">{#Private#}</span>{/if}</td>
<td nowrap style="width:100px">{$team_dates[team]}</td>
</tr>
{/section}

</table>

{else}
<div class='error'>{#NoTeam#}</div>
{/if} 
 <br /> 
 {php}
 $team = new Team;
 do_pages($team->get_team_count(),$team->get_pagesize(), "team"); // show the "page" buttons at the bottom  
 {/php}

